#!/bin/bash
#
# Generate PNG from INDEX
#
for name in $(egrep -v '^#' index.txt)
do
    scad=${name}.scad
    png=${name}.png

    if openscad -o ${png} ${scad}
    then
        git add ${png}
        ls -l ${png}
    else
        cat<<EOF>&2
Error from 'openscad -o ${png} ${scad}'
EOF
        exit 1
    fi
done
